﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Longtop.Web.WebSite.Admin.Roles.CreatePermissionModel>" %>
<%@ Import Namespace="Longtop.Web.WebSite.Models" %>
<%foreach (var item in Model.Permissions) {
      var index = Model.Permissions.IndexOf(item);
%>

    <%=Html.Hidden("Role.Permissions["+index+"].LableId",item.LableId)%>
    <label>
    <input type="checkbox" name="Role.Permissions[<%=index %>].PermissionName" value="<%=item.PermissionName %>,true"
        <%=Model.Role.Permissions.ToList().Exists(p=>p.PermissionName==item.PermissionName)?"checked='checked'":"" %> />
    <%=item.Description %></label>
    <input name="Role.Permissions[<%= index%>].PermissionName" value="<%=item.PermissionName %>,false"
        type="hidden" />

<%} %>
